package org.opens.guava.utilites.eventBus.listeners;

import com.google.common.eventbus.Subscribe;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MultipleEventListeners {

    private final static Logger LOGGER = LoggerFactory.getLogger(MultipleEventListeners.class);

    @Subscribe
    public void task1(String event) {
        LOGGER.info("the event is: [{}], by task1", event);
    }

    /**
     *
     * @param event 事件参数, 不能为基本类型.
     */
    @Subscribe
    public void task2(Integer event) {
        LOGGER.info("the event is: [{}], by task2", event);
    }

    @Subscribe
    public void task3(String event) {
        LOGGER.info("the event is: [{}], by task3", event);
    }

}
